const allListData = [
    {
        id: '01',
        employeeName: '张三',
        employeeNo: '860003',
        salaryDate: '2020-09',
        submitTime: '2020/9/8 17:00',
        feedbackNo: '202009001',
        '': '1、6月份险金有问题，基数不对，请复核 2、6月份个人所得税有问题，专项扣款不对，请复核',
        receiver: null,
        receiveStatus: 1,
        status: '-',
        problemType: 'xxx',
        resolveTime: '-',
        timeConsuming: '-',
        respondContent: '-',
        assignType: '手动'
    },
    {
        id: '02',
        employeeName: '李四',
        employeeNo: '860002',
        salaryDate: '2020-09',
        submitTime: '2020/9/8 17:00',
        feedbackNo: '202009002',
        feedbackContent: '1、6月份险金有问题，基数不对，请复核 2、6月份个人所得税有问题，专项扣款不对，请复核',
        receiver: null,
        receiveStatus: 1,
        status: 1,
        problemType: 1,
        resolveTime: '-',
        timeConsuming: '-',
        respondContent: '-',
        assignType: '手动'
    },
    {
        id: '03',
        employeeName: '王五',
        employeeNo: '860003',
        salaryDate: '2020-09',
        submitTime: '2020/9/8 17:00',
        feedbackNo: '202009003',
        feedbackContent: '1、6月份险金有问题，基数不对，请复核',
        receiver: '丫丫',
        receiveStatus: 1,
        status: '-',
        problemType: 2,
        resolveTime: '-',
        timeConsuming: '-',
        respondContent: '-',
        assignType: '自动'
    },
    {
        id: '04',
        employeeName: '赵六',
        employeeNo: '860004',
        salaryDate: '2020-09',
        submitTime: '2020/9/8 17:00',
        feedbackNo: '202009004',
        feedbackContent: '1、6月份险金有问题，基数不对，请复核',
        receiver: '丫丫',
        receiveStatus: 1,
        status: '-',
        problemType: null,
        resolveTime: '-',
        timeConsuming: '-',
        respondContent: '-',
        assignType: '自动'
    },
    {
        id: '05',
        employeeName: '钱七',
        employeeNo: '860005',
        salaryDate: '2020-09',
        submitTime: '2020/9/8 17:00',
        feedbackNo: '202009005',
        feedbackContent: '1、6月份考勤有问题，6-13日下班超过12点打卡，请复核',
        receiver: '依依',
        receiveStatus: 2,
        status: '待处理',
        problemType: 1,
        resolveTime: '-',
        timeConsuming: '-',
        respondContent: '-',
        assignType: '自动'
    },
    {
        id: '06',
        employeeName: '赵六',
        employeeNo: '860006',
        salaryDate: '2020-09',
        submitTime: '2020/9/8 17:00',
        feedbackNo: '202009006',
        feedbackContent: '1、对绩效系数有疑问',
        receiver: '丫丫',
        receiveStatus: 1,
        status: '已处理',
        problemType: 2,
        resolveTime: '2020/5/8 17:00',
        timeConsuming: '2H20M',
        respondContent: '考勤时间调整导致影响',
        assignType: '自动'
    },
    {
        id: '07',
        employeeName: '钱七',
        employeeNo: '860007',
        salaryDate: '2020-09',
        submitTime: '2020/9/8 17:00',
        feedbackNo: '202009007',
        feedbackContent: '1、对绩效系数有疑问',
        receiver: '丫丫',
        receiveStatus: 1,
        status: '已处理',
        problemType: null,
        resolveTime: '2020/5/8 17:00',
        timeConsuming: '2H20M',
        respondContent: '考勤时间调整导致影响',
        assignType: '手动'
    }
]

const requestAllList = (/* req, res */) => ({
    code: 10000,
    data: {
        total: allListData.length,
        pages: 1,
        pageNo: 1,
        pageSize: 10,
        rows: allListData
    }
});

const requestTransfer = (req, res) => {
    setTimeout(() => {
        res.json({ code: 10000, data: [] })
    }, 2000)
};

const requestAccept = (req, res) => {
    setTimeout(() => {
        res.json({ code: 10000, data: [] })
    }, 2000)
};

const requestNotReceived = (req, res) => {
    setTimeout(() => {
        res.json({ code: 10000,
            data: {
                total: 3,
                pages: 1,
                searchCount: true,
                rows: [
                    {
                        id: '1a80d5d045e10201e56efdeeade8cf2b',
                        employeeName: '刘先军',
                        employeeNo: '8600281',
                        salaryDate: '',
                        submitTime: '',
                        feedbackNo: '',
                        feedback: '',
                        receiver: '刘先军',
                        receiveStatus: null,
                        status: null,
                        resolveTime: '',
                        timeConsuming: '',
                        respondContent: '',
                        assignType: null
                    },
                    {
                        id: '780e6b2910442f9ebd3af94b431afc58',
                        employeeName: '刘先军',
                        employeeNo: '8600281',
                        salaryDate: '2020-12-01',
                        submitTime: '2021-01-06 10:36:27',
                        feedbackNo: '202101004',
                        feedback: 'yyyyy\r\n1:yyyyy\r\n2:yyyyy\r\n',
                        receiver: '刘先军',
                        receiveStatus: 2,
                        status: 1,
                        resolveTime: '',
                        timeConsuming: '',
                        respondContent: '',
                        assignType: 1
                    },
                    {
                        id: '8c1a783b1dadc95f814d4e159d734bd6',
                        employeeName: '刘先军',
                        employeeNo: '8600281',
                        salaryDate: '2020-12-01',
                        submitTime: '2021-01-06 10:41:53',
                        feedbackNo: '202101005',
                        feedback: 'yyyyy\r\n1:yyyyy\r\n2:yyyyy\r\n',
                        receiver: '刘先军',
                        receiveStatus: 1,
                        status: 1,
                        resolveTime: '',
                        timeConsuming: '',
                        respondContent: '',
                        assignType: 1
                    }
                ],
                pageSize: 10,
                pageNo: 1
            } })
    }, 2000)
};


const requestNotDealWith = (req, res) => {
    setTimeout(() => {
        res.json({ code: 10000,
            data: {
                total: 3,
                pages: 1,
                searchCount: true,
                rows: [
                    {
                        id: '1a80d5d045e10201e56efdeeade8cf2b',
                        employeeName: '刘先军',
                        employeeNo: '8600281',
                        salaryDate: '',
                        submitTime: '',
                        feedbackNo: '',
                        feedback: '',
                        receiver: '',
                        receiveStatus: null,
                        status: null,
                        resolveTime: '',
                        timeConsuming: '',
                        respondContent: '',
                        assignType: null
                    },
                    {
                        id: '780e6b2910442f9ebd3af94b431afc58',
                        employeeName: '刘先军',
                        employeeNo: '8600281',
                        salaryDate: '2020-12-01',
                        submitTime: '2021-01-06 10:36:27',
                        feedbackNo: '202101004',
                        feedback: 'yyyyy\r\n1:yyyyy\r\n2:yyyyy\r\n',
                        receiver: '刘先军',
                        receiveStatus: 2,
                        status: 1,
                        resolveTime: '',
                        timeConsuming: '',
                        respondContent: '',
                        assignType: 1
                    },
                    {
                        id: '8c1a783b1dadc95f814d4e159d734bd6',
                        employeeName: '刘先军',
                        employeeNo: '8600281',
                        salaryDate: '2020-12-01',
                        submitTime: '2021-01-06 10:41:53',
                        feedbackNo: '202101005',
                        feedback: 'yyyyy\r\n1:yyyyy\r\n2:yyyyy\r\n',
                        receiver: '刘先军',
                        receiveStatus: 2,
                        status: 0,
                        resolveTime: '',
                        timeConsuming: '',
                        respondContent: '',
                        assignType: 1
                    }
                ],
                pageSize: 10,
                pageNo: 1
            } })
    }, 2000)
};

export default {
    'POST x/api/finance/salary/v1/salaryFeedback/all/list': (req, res) => {
        console.log('/api/finance/salary/v1/salaryFeedback/all/list:使用mock数据');
        res.json(requestAllList(req));
    },

    'POST x/api/finance/salary/v1/salaryFeedback/assignToSomeone/transfer': (req, res) => {
        console.log('/api/finance/salary/v1/salaryFeedback/assignToSomeone/transfer:使用mock数据');
        requestTransfer(req, res);
    },

    'POST x/api/finance/salary/v1/salaryFeedback/notReceived/list': (req, res) => {
        console.log('/api/finance/salary/v1/salaryFeedback/notReceived/list:使用mock数据');
        requestNotReceived(req, res);
    },

    'POST x/api/finance/salary/v1/salaryFeedback/notDealWith/list': (req, res) => {
        console.log('/api/finance/salary/v1/salaryFeedback/notDealWith/list:使用mock数据');
        requestNotDealWith(req, res);
    },

    'POST x/api/finance/salary/v1/salaryFeedback/done/list': (req, res) => {
        console.log('/api/finance/salary/v1/salaryFeedback/notDealWith/list:使用mock数据');
        requestNotDealWith(req, res);
    },

    'POST x/api/finance/salary/v1/salaryFeedback/accept/all': (req, res) => {
        console.log('/api/finance/salary/v1/salaryFeedback/accept/all:使用mock数据');
        requestAccept(req, res);
    },

    'GET x/api/finance/salary/v1/salarySet/grant/feedback/isMaster': (req, res) => {
        console.log('/api/finance/salary/v1/salarySet/grant/feedback/isMaster:使用mock数据');
        res.json({
            code: 10000,
            data: true
        });
    }
};
